package com.xiaoxi.codemodelserver.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.xiaoxi.codemodelserver.domain.dto.BMSDictDTO;
import com.xiaoxi.codemodelserver.domain.vo.BMSDictTree;
import com.xiaoxi.codemodelserver.domain.vo.BMSDictVO;
import com.xiaoxi.common.exception.BMSException;
import com.xiaoxi.domain.quick.BmsDict;
import org.springframework.data.domain.Pageable;

import java.util.List;

/**
 * @ClassName BmsDictService
 * @Description
 * @Author xiaoxi
 * @Date 2022-11-03
 * @Version 1.0
 */
public interface BmsDictService extends IService<BmsDict> {

    /**
     * 展示树状结构
     *
     * @return
     */
    List<BMSDictTree> findListByTree() throws BMSException;

    /**
     * 分页查询
     *
     * @param bmsDictDTO
     * @return
     * @throws BMSException
     */
    IPage<BmsDict> findListByPage(BMSDictDTO bmsDictDTO, Pageable pageable) throws BMSException;


    /**
     * 添加
     *
     * @param bmsDictVO 字典详细数据表
     */
    void add(BMSDictVO bmsDictVO) throws BMSException;

    /**
     * 删除字典详细数据表
     *
     * @param id 主键
     */
    void delete(Long id) throws BMSException;

    /**
     * 修改字典详细数据表
     *
     * @param bmsDictVO 字典详细数据表
     * @return JsonBean
     */
    void update(BMSDictVO bmsDictVO) throws BMSException;

    /**
     * id查询数据
     *
     * @param id id
     * @return BmsDict
     */
    BmsDict findById(Long id) throws BMSException;

}
